using System;
using System.Collections.Generic;
using System.Text;
using MbUnit.Framework;
using EnterpriseLibraryContrib.PostSharp4EntLib.PolicyInjection;

namespace EnterpriseLibraryContrib.PostSharp4EntLib.Test.PolicyInjection.SystemTests
{
    [TestFixture]
    public class Parameters
    {
        [LogCallHandler]
        private void OutParameter( int input, out int output)
        {
            output = input;
        }

        [Test]
        public void TestOutParameter()
        {
            int value;
            this.OutParameter(5, out value);
            Assert.AreEqual(5, value);
        }

        [LogCallHandler]
        private void RefParameter( ref int value )
        {
            value++;
        }

        [Test]
        public void TestRefParameter()
        {
            int value = 5;
            this.RefParameter(ref value);
            Assert.AreEqual(6, value);
        }

        [LogCallHandler]
        private int ReturnValue(int value)
        {
            return value;
        }

        [Test]
        public void TestReturnValue()
        {
            Assert.AreEqual(5, this.ReturnValue(5));
        }

    }
}
